<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>测试fromEvent_2</title>
</head>
<body>
<input id="inputText" type="text"/>
<button id="addBtn">Add</button>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.0-beta.7/dist/global/Rx.umd.js"></script>
<script>
	let inps = document.getElementById('inputText');
	let addBtn = document.getElementById('addBtn');
	let buttonClick$ = Rx.Observable.fromEvent(addBtn,'click')
	.mapTo('clicked');
	let input$ = Rx.Observable.fromEvent(inps,'keyup')
	.pluck('target','value');
//	.subscribe(value=>console.log(value));
Rx.Observable.combineLatest(buttonClick$, input$, (ev, input)=>{
	return {
		ev: ev,
		input: input
	}
})
.subscribe(value => console.log(value))
</script>
</body>
</html>